<!--
 * @Description: articleDetails  -- 文章详情
 * @Author: your name
 * @Date: 2024-12-26
 * @LastEditTime: 2024-12-26
 * @LastEditors: Please set LastEditors
-->

<template>
  <div class="articleDetails heart_w">
    <!-- 头部广告条 -->
    <div class="advertise_local">
      <div class="swiper_con">
        <div class="swiper-container">
          <div class="swiper-wrapper">
            <div class="swiper-slide">
              <a
                href="https://www.rongyuejiaoyu.com/combo/index/material"
                title="CFA豪华学习礼包免费领"
                target="_blank"
                rel="nofollow"
              >
                <img
                  src="https://img.rongyuejiaoyu.com/uploads/20220920/2e3ff2d159515165915feb78fa9642e7.jpg"
                  alt="CFA豪华学习礼包免费领"
                />
              </a>
            </div>
            <div class="swiper-slide">
              <a
                href="https://www.rongyuejiaoyu.com/combo/index/material"
                title="CFA豪华学习礼包免费领"
                target="_blank"
                rel="nofollow"
              >
                <img
                  src="https://img.rongyuejiaoyu.com/uploads/20220223/32e75f7934927424f20bbc7b28fc2566.jpg"
                  alt="CFA豪华学习礼包免费领"
                />
              </a>
            </div>
            <div class="swiper-slide">
              <a
                href="https://www.rongyuejiaoyu.com/combo/index/material"
                title="CFA豪华学习礼包免费领"
                target="_blank"
                rel="nofollow"
              >
                <img
                  src="https://img.rongyuejiaoyu.com/uploads/20220920/2e3ff2d159515165915feb78fa9642e7.jpg"
                  alt="CFA豪华学习礼包免费领"
                />
              </a>
            </div>
          </div>
        </div>
      </div>
    </div>

    <div class="row_con">
      <main class="col-md-8">
        <div class="panel">
          <div class="panel_heading">
            <ol>
              <li><a href="/cfa/index" target="_blank">首页</a></li>
              <li><a href="/cfa/list/8" target="_blank">热点资讯</a></li>
              <li class="xijie">
                <a href="35057.html">2024年CFA考试题型详解，不知道的速看！</a>
              </li>
            </ol>
          </div>

          <div class="panel_body">
            <div class="article_metas">
              <h1>{{ articleObj.title }}</h1>
              <div class="metas_body">
                <span>编辑：{{ articleObj.author }}</span>
                <span>{{ articleObj.time }}</span>
                <span class="views-num">
                  <i class="el-icon-view"></i> {{ articleObj.views }} 阅读
                </span>
              </div>
            </div>

            <div class="article_text">{{ articleObj.content }}</div>

            <div class="news_code">
              <img
                src="@/assets/images/details_dtai/new_addcfa.jpg"
                alt="添加老师领取学习资料"
              />
            </div>

            <!-- 禁止转载 -->
            <div class="danger_tips" v-if="false">
              <span class="statement">
                转载声明：本篇内容来自
                <a href="http://www.rongyuejiaoyu.com" title="融跃教育官网">
                  融跃教育官网
                </a>
                ，地址：
                <a
                  id="ihref"
                  href="http://www.rongyuejiaoyu.com/CFA/article/35057.html"
                  title="2024年CFA考试题型详解，不知道的速看！"
                >
                  http://www.rongyuejiaoyu.com/
                  <i id="ikemu" style="font-style: normal"> CFA </i>
                  /article/35057.html
                </a>
              </span>
              <span class="statement">
                本站文章转载需注明来源！如有侵权请立即与我们联系(rongyuejiaoyu)，我们将及时处理！
              </span>
            </div>

            <div class="entry-meta">
              <ul>
                <li>
                  <span>上一篇 &gt;</span>
                  <a
                    href="/cfa/article/35041.html"
                    title="CFA特许金融分析师考试通过率高吗？"
                    target="_blank"
                  >
                    CFA特许金融分析师考试通过率高吗？
                  </a>
                </li>
              </ul>
            </div>

            <div class="foot_live">
              <h3>课程推荐</h3>
              <div class="flashSale_wrap">
                <div class="swiper_con">
                  <div class="swiper-container">
                    <div class="swiper-wrapper">
                      <div class="swiper-slide" v-for="it in 5" :key="it">
                        <li index="1">
                          <a
                            href="/combo/order/combo_detail/coid/538"
                            target="_blank"
                          >
                            <img
                              src="https://video.rycfa.com/image/default/976897EBCD504A09BA391BF25BFB4E95-6-2.jpg"
                              style="height: 137px"
                              alt="CFA+FRM双证快速通关APS智播课（A计划）"
                            />
                            <p>CFA快速通关APS智播课</p>
                          </a>
                        </li>
                      </div>
                    </div>

                    <!-- 前进后退按钮 -->
                    <div class="swiper-button-next"></div>
                    <div class="swiper-button-prev"></div>
                  </div>
                </div>
              </div>
            </div>
          </div>
        </div>
      </main>

      <aside class="col-md-8 right-nav">
        <!-- 试听课程 -->
        <div class="trialCourse" v-if="false">
          <div class="top_tit">
            <h3>试听课程</h3>
            <div>
              <img
                class="live_l"
                src="@/assets/images/details_dtai/turnLeft.png"
                alt=""
                style="margin-right: 5px"
              />
              <img
                class="live_r"
                src="@/assets/images/details_dtai/turnRight.png"
                alt=""
              />
            </div>
          </div>

          <div class="big_box">
            <div class="out_box">
              <ul id="zturn" class="poster-list" style="overflow: hidden">
                <li class="poster_item">
                  <p class="xxgy">CFA免费试听课程</p>
                  <div class="for_btn">
                    <a href="/combo/index/free" target="_blank">
                      <img
                        src="@/assets/images/details_dtai/shiting.jpg"
                        width="100%"
                      />
                    </a>
                  </div>
                  <div class="students_star">
                    <p class="cell_list">
                      <span class="lf">
                        课程模式：<span class="darks">在线视频</span>
                      </span>
                      <span class="rt">
                        价格：<span class="darks">免费试听</span>
                      </span>
                    </p>
                    <p class="cell_list">
                      <span>
                        在线申请：
                        <a
                          href="/combo/index/free"
                          target="_blank"
                          class="darks_st"
                        >
                          申请试听
                        </a>
                      </span>
                    </p>
                  </div>
                </li>
              </ul>
            </div>
          </div>
        </div>

        <!-- 报考指南 -->
        <div class="text_guide">
          <h3>报考指南</h3>
          <ul class="nine_ul">
            <li v-for="(item_li, i) in 12" :key="i">
              <a href="#">
                <img
                  src="https://img.rongyuejiaoyu.com/uploads/20220223/eff3fde7bf78411cd8dec7430ed74d34.png"
                  alt=""
                />
                <p>报名条件</p>
              </a>
            </li>
          </ul>
        </div>

        <!-- 免费资料下载 -->
        <div class="download_rank" v-if="false">
          <h3>免费资料下载</h3>
          <ul>
            <li v-for="down_item in 3" :key="down_item">
              <a href="#">
                <img
                  src="https://www.rongyuejiaoyu.com/static/material/assets/images/tubiao.png"
                  alt=""
                />
                <span>2024年CFA考试三级考纲变化解读</span>
                <button>下载</button>
              </a>
            </li>
          </ul>
        </div>

        <!-- 阅读排行 -->
        <div class="read_rank" v-if="false">
          <h3>阅读排行</h3>
          <ul>
            <li v-for="(item, i) in 3" :key="item">
              <i>{{ i + 1 }}</i>
              <a
                href="#"
                title="CFA奖学金2024年申请时间公布！附完整版申请攻略"
                target="_blank"
              >
                CFA奖学金2024年申请时间公布！附完整版申请攻略
              </a>
            </li>
          </ul>
        </div>

        <!-- 热门推荐 -->
        <div class="finance_interview">
          <h3>热门推荐</h3>
          <div class="interview_news">
            <a
              href="#"
              title="2024年5月CFA考试地点能改吗?"
              target="_blank"
              v-for="item_a in 3"
              :key="item_a"
            >
              2024年5月CFA考试地点能改吗?
            </a>
          </div>
        </div>
      </aside>
    </div>
  </div>
</template>

<script>
import { getArticleInfo } from '@/api/consult/zixun.js'

export default {
  name: 'articleDetails',
  data() {
    return {
      articleId: '',
      articleObj: {}
    }
  },
  created() {
    this.articleId = this.$route.query.id
    console.log(this.$route.query)
    this.getArticleData(this.$route.query.id)
  },
  mounted() {
    this.swiper_t()
  },
  methods: {
    swiper_t() {
      new this.$swiper('.advertise_local .swiper-container', {
        autoplay: true
      })
      new this.$swiper('.foot_live .swiper-container', {
        slidesPerView: 3,
        navigation: {
          nextEl: '.foot_live .swiper-button-next',
          prevEl: '.foot_live .swiper-button-prev'
        },
        observer: true,
        observeParents: true
      })
    },
    getArticleData(Id) {
      getArticleInfo({ id: Id }).then(({ data: data }) => {
        this.articleObj = data.data
        console.log(data.data)
      })
    }
  }
}
</script>

<style scoped lang="scss">
@import '@/assets/styles/hotspot_details.scss';

.advertise_local {
  margin: 30px 0;
}

.panel {
  padding: 0 15px;
  background-color: #fff;

  .panel_heading {
    position: relative;
    background: #fff;
    border-bottom: 1px solid #f5f5f5;
    padding: 0;
    margin: 0 -15px;

    ol {
      background: #fff;
      font-size: 13px;
      margin-bottom: 0;
      padding: 10px 15px;

      li {
        display: inline-block;
        font-size: 15px;

        a:hover {
          color: #11181f;
          text-decoration: underline;
        }
      }

      & > li + li:before {
        content: '/\00a0';
        padding: 0 5px;
        color: #ccc;
      }
    }
  }

  .panel_body {
    position: relative;
    padding: 15px 0;
    .article_metas {
      overflow: hidden;

      h1 {
        margin: 0;
        font-size: 1.6em;
        line-height: 1.45;
        margin-bottom: 5px;
        color: #000;
      }
      .metas_body {
        color: #999;
        margin: 0px auto;
        span {
          margin-right: 32px;
          font-size: 1rem;
          i {
            margin-right: 5px;
          }
        }
      }
    }

    .article_text {
      margin-top: 15px;
    }

    .news_code {
      width: 100%;
      box-sizing: border-box;
      margin: 20px 0;
      overflow: hidden;
    }

    .danger_tips {
      font-size: 16px;
      color: #666666;
      overflow: hidden;
      margin-bottom: 15px;

      span.statement {
        display: block;
        color: #a9a6a6;
        font-size: 14px;
        background: #efefef;
        border-left: 5px solid #ccc;
        text-indent: 10px;
        line-height: 24px;

        a {
          text-decoration: underline;
          color: #a9a6a6;
          font-weight: bold;
          word-break: break-all;
        }
      }
    }

    .entry-meta {
      ul {
        overflow: hidden;
        margin: 0 0 10px 0;
        padding: 0 0 10px 0;
        color: #666;

        span,
        a {
          font-size: 1rem;
        }

        li {
          a:hover {
            color: #11181f;
            text-decoration: underline;
          }
        }
      }
    }

    .foot_live {
      display: block;
      width: 100%;
      height: 252px;
      background: #fff;
      box-shadow: 0 1px 2px 0 rgb(0 0 0 / 10%);
      h3 {
        font-size: 16px;
        color: #333;
        margin-bottom: 15px;
        padding: 15px 0;
        background: #fff;
        border-bottom: 1px solid #f5f5f5;
      }
      .flashSale_wrap {
        width: 100%;
        height: 137px;
        margin: 20px auto;

        .swiper-container {
          // padding: 0 28px;
          padding-left: 30px;

          .swiper-button-prev,
          .swiper-button-next {
            background: #2a4c7e;
            color: #fff;
            border-radius: 2px;
            height: 55px;
            opacity: 1;
          }
          .swiper-button-next {
            right: 0;
          }

          .swiper-button-prev {
            left: 0;
          }

          .swiper-button-next:after,
          .swiper-button-prev::after {
            font-size: 20px;
            font-weight: bold;
          }
        }

        li {
          width: 210px;
          text-align: center;

          &:hover {
            a {
              p {
                color: #11181f;
                text-decoration: underline;
              }
            }
          }

          a {
            height: 100%;
            display: block;
            p {
              margin-top: 5px;
              text-align: center;
              width: 100%;
              font-size: 1rem;
            }
          }
        }
      }
    }
  }
}

.trialCourse {
  height: 400px;
  margin-bottom: 24px;

  .top_tit {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 15px;
    background: #fff;
    border-bottom: 1px solid #f5f5f5;
    h3 {
      font-size: 16px;
      color: #333;
    }
    img {
      cursor: pointer;
    }
  }

  .big_box {
    width: 100%;
    background: #fff;
    overflow: hidden;

    .out_box {
      width: 350px;
      height: 360px;
      overflow: hidden;
      margin: 0 auto;

      li {
        background: #fff;
        padding: 10px 15px 0px;
        transition: all 0.5s;
        cursor: default;
        height: 360px;

        .xxgy {
          font-size: 18px;
          padding-bottom: 10px;
          text-align: center;
          color: #333;
          overflow: hidden;
          text-overflow: ellipsis;
          white-space: nowrap;
        }

        .for_btn {
          position: relative;
          height: 214px;
          overflow: hidden;
        }

        .students_star {
          padding: 10px 10px 0 10px;
          .cell_list {
            margin-bottom: 20px;
            color: #999;
            font-size: 16px;
            overflow: hidden;

            .darks {
              color: #333;
              padding-left: 10px;
            }

            .rt {
              float: right;
            }

            .darks_st {
              color: #fff;
              text-align: center;
              font-size: 15px;
              cursor: pointer;
              width: 85px;
              height: 25px;
              border-radius: 15px;
              background-color: #bd0000;
              display: inline-block;
              line-height: 24px;
            }
          }
        }
      }
    }
  }
}
</style>
